package com.lzw.breezeNovel.webApp.controller.video;

import com.lzw.breezeNovel.common.result.Result;
import com.lzw.breezeNovel.model.entity.query.Search;
import com.lzw.breezeNovel.webApp.service.video.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 清风明月
 * @Package com.lzw.breezeNovel.webApp.controller.video
 * @date 2025/3/18
 * @description 搜索
 */
@RestController
@RequestMapping("/app/video")
@SuppressWarnings("all")
public class SearchController {

    /**
     * 注入service
     */
    @Autowired
    private SearchService searchService;

    /**
     * 搜索
     */
    @PostMapping("/search")
    private Result<List>  search(@RequestBody Search search)
    {
        List result = searchService.search(search);
        return Result.ok(result);
    }

}
